#include <iostream>
#include <cstring>
#include <queue>
#include <string>
#include <vector>

using namespace std;

int n, m;
const int N = 100010;
int h[N], e[N], ne[N], idx;
int d[N];

void add(int a, int b) {
	e[idx] = b, ne[idx] = h[a], h[a] = idx++;
	d[b]++;
}

void init() {
	idx = 0;
	memset(h, -1, sizeof(h));
}

void topsort() {
	queue<int> q;
	vector<int> ans;
	for (int i = 1; i <= n; i++) {
		if (d[i] == 0) {
			q.push(i);
		}
	}

	while (!q.empty()) {
		int t = q.front();
		q.pop();
		ans.push_back(t);
		for (int i = h[t]; i != -1; i = ne[i]) {
			int j = e[i];
			d[j]--;
			if (d[j] == 0) {
				q.push(j);
			}
		}
	}

	if (ans.size() != n) {
		cout << -1 << endl;
	}
	else {
		for (int res : ans) {
			cout << res << " ";
		}
		cout << endl;
	}
}

int main() {
	cin >> n >> m;
	init();
	while (m--) {
		int a, b;
		cin >> a >> b;
		add(a, b);
	}

	topsort();

	return 0;
}